package demo;

import java.time.LocalDate;
import java.time.temporal.ChronoField;

/**
 * @description:
 * @author: GX
 * @time: 2025/10/30 16:28
 */
public class timeTest {
    public static void main(String[] args) {
        LocalDate today = LocalDate.now();
        // 2023
        System.out.println(today.getYear());
        // 2
        System.out.println(today.getMonth());
        // 5
        System.out.println(today.getDayOfMonth());

        // 今天是一周中的第几天，
        System.out.println(today.get(ChronoField.DAY_OF_WEEK));
        // 今天是今年的第几天
        System.out.println(today.getDayOfYear());

    }
}
